﻿<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>WeUI</title>
</head>
<body ontouchstart>
<div class="test" style="width:100%; height:500px; overflow-y:auto;">
    55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />
    55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />55<br />
    <div class="weui-loadmore">
      <i class="weui-loading"></i>
      <span class="weui-loadmore__tips">正在加载</span>
    </div>
</div>

<script src="/js/zepto.min.js"></script>
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>

<script>
    var count = 0;
        var height=$(".test").height();
        $(".test").infinite($(window).height-height).on("infinite", function () {
            var self = this;
            if (self.loading) return;
            alert();
            self.loading = true;

            setTimeout(function () {
                //self.loading = false;
            }, 1000);

        });


</script>
</body>
</html>
